package com.tuo51.foudation.constant;

import lombok.Data;
import lombok.Setter;

/**
 * *******************************
 * Created by lch.
 * form com.matt
 * on 2018/12/02
 * *******************************
 */
@Data
public class NurseryScheduleConstant {

    public enum Status{
        NON_SCHEDULE(0, "未排课"),
        SCHEDULE(1, "已排课");

        @Setter
        private int code;

        @Setter
        private String value;

        Status(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public Status get(int code){
            for (Status status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }

    public enum CourseType{
        NON_TOPIC(0, "非主题课"),
        TOPIC(1, "主题课");

        @Setter
        private int code;

        @Setter
        private String value;

        CourseType(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public CourseType get(int code){
            for (CourseType courseType : values()) {
                if (courseType.codeOf()==code)
                    return courseType;
            }
            return null;
        }
    }

    //审核状态
    public enum CheckStatus{
        WAIT_CHECK(0, "待审核"),
        PASS_CHECK(1, "通过"),
        NON_PASS_CHECK(2,"未通过");

        @Setter
        private int code;

        @Setter
        private String value;

        CheckStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public CheckStatus get(int code){
            for (CheckStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }
}
